As a protocol for synchronizing distributed clocks on a network, for example, IEEE 1588 (PTP: Precision Time Protocol) is defined (IEEE Std 1588, “IEEE Standard for a Precision Clock Synchronization Protocol for Networked Measurement and Control Systems”).
In PTP, predetermined messages are exchanged between a device (a “master”) that provides a time reference and a device (a “slave”) that depends on a master, and the slave that achieves time synchronization with the master using the messages.
For example, a slave calculates the time difference (offset) between a master and the slave and the route delay (delay) that includes latency in a network and latency between the devices, corrects the clock based on the calculation results, thereby synchronizes the slave's time with the time of the master.
An example of time synchronization via PTP is illustrated in FIG. 1. As illustrated in FIG. 1, when receiving a synchronization message (Sync) from a master, a slave records the slave time t2 when the synchronization message is received (see “Timestamps known by slave” in FIG. 1).
In addition, when receiving a supplemental message (Follow_Up) from the master, the slave extracts, from the supplemental message, a time t1 when the synchronization message was transmitted by the master and records the time t1. The supplemental message is optional and may not be used. When the supplemental message is not used, the synchronization message includes the time t1 when the synchronization message was transmitted by the master, and the slave extracts the time t1 from the synchronization message and records it. The difference tms between the time t2 and the time t1 equals the sum (offset+delay) of the time difference (offset) between the master and the slave and the delay (delay).
Then, the slave transmits a delay information request message (Delay_Req) to the master. At this point, the slave records the slave time t3 when the delay information request message is transmitted.
When receiving the delay information request message from the slave, the master generates a delay information response message (Delay_Resp) that includes a time t4 that is when the delay information request message was received and transmits the delay information response message to the slave.
When receiving the delay information response message from the master, which is a response to the delay information request message, the slave extracts, from the delay information response message, the time t4 when the delay information request message was received by the matter and records it. The difference tsm between the time t4 and the time t3 is obtained by subtracting the time difference (offset) between the master and the slave from the delay (delay).
Accordingly, the time difference (offset) between the master and the slave is obtained by the following expression.Offset=[tms−tsm]/2=[(t2−t1)−(t4−t3)]/2  (1)
The slave achieves time synchronization with the master by correcting its time based on the time difference (offset) obtained as described above.
Japanese Laid-open Patent Publication No. 2010-213101 discloses a technique for achieving time synchronization at high precision by, for example, matching a transmission delay when messages are transmitted from a master node to a slave node and a transmission delay when messages are transmitted from the slave node to the master node.
Japanese Laid-open Patent Publication No. 2008-193698 discloses a technique for achieving clock synchronization at high precision in a wireless network that provides IP access by, for example, using frame pulses as the sampling points of a master counter and slave counter.
Japanese Laid-open Patent Publication No. 2010-190635 discloses a technique for achieving time synchronization at high precision by avoiding the use of the calculation results of an offset that includes an error for a time correction of the clock unit of the slave.